class Module
  
  def once(*methods)
    methods.each do |method|
      method = method.to_sym;
      emethod = self.instance_method(method);
      self.send(:define_method, method) do |*args|
        @cached_methods ||= {};
        unless @cached_methods[method]
          @cached_methods[method] = emethod.bind(self).call(*args);
        end
        @cached_methods[method];
      end
    end
  end

end

class Person

  def hello(name)
    "Hello, #{name}"
  end
  
  def walk
    puts "Walking..."
    "Here!"
  end
  
  once :hello, :walk

end

someone = Person.new
someone.hello "Bernardo"  #=> "Hello, Bernardo"
someone.hello "World"     #=> "Hello, Bernardo"
someone.walk              #Will print "Walking..." and return "Here!"
someone.walk              #Just return "Here!"